Skip to content

Improve event value cache#8647

Merged
APickledWalrus merged 4 commits into
dev/patchfrom
patch/fix-event-value-cache
May 20, 2026
Merged

Improve event value cache#8647
APickledWalrus merged 4 commits into
dev/patchfrom
patch/fix-event-value-cache

Conversation

@UnderscoreTud
Copy link
Copy Markdown
Member

@UnderscoreTud UnderscoreTud commented May 15, 2026

Problem

The event value registry doesn't take into account event validators when caching event value resolutions, this causes issues when an event value relies on external factors that are not constrained to just the event class. For example, skript-reflect's custom events register one skript event and rely on the identifier to figure out which custom event's logic to use. This causes Skript to wrongly cache event values as successful/failure and use the same cached result for all subsequent calls for that event value, no matter the custom event.

Solution

Include an option to exclude an event value from being cached if it depends on external contexts.

Testing Completed

EventValueRegistryTest.java

Supporting Information


Completes: none
Related: none
AI assistance: junie for writing most test cases

@UnderscoreTud UnderscoreTud requested a review from a team as a code owner May 15, 2026 15:43
@UnderscoreTud UnderscoreTud requested review from Burbulinis and Pesekjak and removed request for a team May 15, 2026 15:43
@skriptlang-automation skriptlang-automation Bot added needs reviews A PR that needs additional reviews needs triage An issue that hasn't been classified or verified yet labels May 15, 2026
@skriptlang-automation

This comment has been minimized.

@skriptlang-automation skriptlang-automation Bot added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label May 15, 2026
@skriptlang-automation skriptlang-automation Bot removed the needs triage An issue that hasn't been classified or verified yet label May 15, 2026
@skriptlang-automation skriptlang-automation Bot moved this to In Review in 2.15 Releases May 15, 2026
@skriptlang-automation skriptlang-automation Bot added patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. and removed needs reviews A PR that needs additional reviews labels May 15, 2026
@github-project-automation github-project-automation Bot moved this from In Review to Awaiting Merge in 2.15 Releases May 15, 2026
@APickledWalrus APickledWalrus merged commit cf70374 into dev/patch May 20, 2026
13 checks passed
@github-project-automation github-project-automation Bot moved this from Awaiting Merge to Done - Awaiting Release in 2.15 Releases May 20, 2026
@skriptlang-automation skriptlang-automation Bot added the completed The issue has been fully resolved and the change will be in the next Skript update. label May 20, 2026
@APickledWalrus APickledWalrus deleted the patch/fix-event-value-cache branch May 20, 2026 15:13
@skriptlang-automation skriptlang-automation Bot removed the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update.

Projects

Status: Done - Awaiting Release

Development

Successfully merging this pull request may close these issues.

3 participants